function isType(type) {
    return function (obj) {
        console.log(Object.prototype.toString.call(obj))
    return Object.prototype.toString.call(obj) === `[object ${type}]`
    }

}


const isString = isType('String')
const isObject = isType('Osbject')

console.log(isString('string'));

console.log(isObject({}))
